<!--- 
LICENSE INFORMATION:

Copyright 2007, Hem Talreja
 
Licensed under the Apache License, Version 2.0 (the "License"); you may not 
use this file except in compliance with the License. 

You may obtain a copy of the License at 

	http://www.apache.org/licenses/LICENSE-2.0 
	
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 
CONDITIONS OF ANY KIND, either express or implied. See the License for the 
specific language governing permissions and limitations under the License.

VERSION INFORMATION:	(0.001)

 --->
<cfcomponent output="false" extends="dbProperties">
	
	<!--- overwrite the base constructor --->
	<cffunction name="init" access="public" returntype="dbFunctions" output="false">
		
		<cfreturn this />
	</cffunction>


	
	<cffunction name="Date" access="public" returntype="string" output="false">
		<cfargument name="dteDateTime" required="false" type="date" />
		
		<cfset var strReturnDate = "" />
		<cfset var strDBType = getDBType() />
		
		<cfif isDefined("Arguments.dteDateTime") AND isDate(Arguments.dteDateTime)>
			<cfset strReturnDate = createODBCDate(arguments.dtedatetime) />
		<cfelse>
			<cfset strReturnDate = getDBDate() />
		</cfif>
		
		<cfreturn strReturnDate />
	</cffunction>
	
	
	<cffunction name="DateTime" access="public" returntype="string" output="false">
		<cfargument name="dteDateTime" required="false" type="date" />
		
		<cfset var strReturnDate = "" />
		
		<cfif isDefined("Arguments.dteDateTime") AND isDate(Arguments.dteDateTime)>
			<cfset strReturnDate = createODBCDateTime(arguments.dtedatetime) />
		<cfelse>
			<cfset strReturnDate = getDBDateTime() />
		</cfif>
		
		<cfreturn strReturnDate />
	</cffunction>
	
	<cffunction name="Time" access="public" returntype="string" output="false">
		<cfargument name="dteDateTime" required="true" type="date" />
		
		<cfset var strReturnTime = "" />
		
		<cfif isDefined("Arguments.dteDateTime") AND isDate(Arguments.dteDateTime)>
			<cfset strReturnTime = CreateODBCTime(Arguments.dteDateTime) />
		<cfelse>
			<cfset strReturnTime = getDBTime() />
		</cfif>
		
		<cfreturn strReturnTime />
	</cffunction>	<!--- Time --->
	
	
</cfcomponent>